home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / porting.notes < prev    next >
Text File  |  1993-07-13  |  5KB  |  125 lines

  1. This file contains a collection of notes that various people have
  2. provided about porting Tcl to various machines and operating systems.
  3. I don't have personal access to any of these machines, so I make
  4. no guarantees that the notes are correct, complete, or up-to-date.
  5. In some cases, a person has volunteered to act as a contact point
  6. for questions about porting Tcl to a particular machine;  in these
  7. cases the person's name and e-mail address are listed.
  8.  
  9. ---------------------------------------------
  10. Cray machines running UNICOS:
  11. Contact: John Freeman (jlf@cray.com)
  12. ---------------------------------------------
  13.  
  14. 1. There is an error in the strstr function in UNICOS such that if the
  15. string to be searched is empty (""), the search will continue past the
  16. end of the string.  Because of this, the history substitution loop
  17. will sometimes run past the end of its target string and trash
  18. malloc's free list, resulting in a core dump some time later.  (As you
  19. can probably guess, this took a while to diagnose.)  I've submitted a
  20. problem report to the C library maintainers, but in the meantime here
  21. is a workaround.
  22.  
  23. -----------------------------------------------------------------
  24. diff -c1 -r1.1 tclHistory.c
  25. *** 1.1    1991/11/12 16:01:58
  26. --- tclHistory.c    1991/11/12 16:14:22
  27. ***************
  28. *** 23,24 ****
  29. --- 23,29 ----
  30.   #include "tclInt.h"
  31. + #ifdef _CRAY
  32. + /* There is a bug in strstr in UNICOS; this works around it. */
  33. + #define strstr(s1,s2) ((s1)?(*(s1)?strstr((s1),(s2)):0):0)
  34. + #endif _CRAY
  35.  
  36. ---------------------------------------------
  37. MIPS systems runing EP/IX:
  38. ---------------------------------------------
  39.  
  40. 1. Need to add a line "#include <bsd/sys/time.h>" in tclUnix.h.
  41.  
  42. 2. Need to add "-lbsd" into the line that makes tclTest:
  43.  
  44.     ${CC} ${CFLAGS} tclTest.o libtcl.a -lbsd -o tclTest
  45.  
  46. ---------------------------------------------
  47. IBM RS/6000 systems running AIX:
  48. ---------------------------------------------
  49.  
  50. 1. The system version of strtoul is buggy, at least under some
  51. versions of AIX.  If the expression tests fail, try forcing Tcl
  52. to use its own version of strtoul instead of the system version.
  53. To do this, first copy strtoul.c from the compat subdirectory up
  54. to the main Tcl directory.  Then modify the Makefile so that
  55. the definition for COMPAT_OBJS includes "strtoul.o".  Note:  the
  56. "config" script should now detect the buggy strtoul and substitute
  57. Tcl's version automatically.
  58.  
  59. 2. You may have to comment out the declaration of open in tclUnix.h.
  60.  
  61. 3. You may need to add "-D_BSD -lbsd" to the CFLAGS definition.  This
  62. causes the system include files to look like BSD include files and
  63. causes C library routines to act like bsd library routines.  Without
  64. this, the system may choke on "struct wait".
  65.  
  66. ---------------------------------------------
  67. AT&T 4.03 OS:
  68. ---------------------------------------------
  69.  
  70. Machine: i386/33Mhz i387 32k Cache 16MByte 
  71. OS: AT&T SYSV Release 4 Version 3
  72. X: X11R5 fixlevel 9
  73. Xserver: X386 1.2
  74.  
  75. 1. Change the Tk Makefile as follows:
  76. XLIB            = -lX11
  77.     should be changed to:
  78. XLIB            = -lX11 -lsocket -lnsl
  79.  
  80. -------------------------------------------------------
  81. Silicon Graphics systems:
  82. -------------------------------------------------------
  83.  
  84. 1. Change the CC variable in the Makefile to:
  85.  
  86. CC =        cc -xansi -D__STDC__ -signed
  87.  
  88. 2. In  Irix releases 4.0.1 or earlier the C compiler has a buggy optimizer.
  89.    If Tcl fails its test suite or generates inexplicable errors,
  90.    compile tclVar.c with -O0 instead of -O.
  91.  
  92. ---------------------------------------------
  93. NeXT machines running NeXTStep 2.1:
  94. ---------------------------------------------
  95.  
  96. 1. Several of the "format" and "scan" tests will fail, but these are
  97. all minor nits stemming from imperfect POSIX compliance in the NeXT
  98. C library procedures.  The errors are unlikely to affect any Tcl
  99. applications.
  100.  
  101. -------------------------------------------------
  102. ISC 2.2 UNIX (using standard ATT SYSV compiler):
  103. -------------------------------------------------
  104.  
  105. In Makefile, change
  106.  
  107. CFLAGS =      -g -I. -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  108.  
  109. to
  110.  
  111. CFLAGS =      -g -I. -DPOSIX_JC -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  112.  
  113. This brings in the typedef for pid_t, which is needed for
  114. /usr/include/sys/wait.h in tclUnix.h.
  115.  
  116. ---------------------------------------------
  117. DEC Alphas:
  118. ---------------------------------------------
  119.  
  120. 1. There appears to be a compiler/library bug that causes core-dumps
  121. unless you compile tclVar.c without optimization (remove the -O compiler
  122. switch).  The problem appears to have been fixed in the 1.3-4 version
  123. of the compiler.
  124.